<?

require_once 'PHPUnit/Framework.php';

class SemConexaoTest extends PHPUnit_Framework_TestCase
{
	/**
	* Executa o teste
	*/
	public static function main()
	{
		require_once 'PHPUnit/TextUI/TestRunner.php';
        $suite  = new PHPUnit_Framework_TestSuite(__CLASS__);
        $result = PHPUnit_TextUI_TestRunner::run($suite);
	}

	public function test_alguma_coisa()
	{
		$this->assertEquals(0, "0");
	}

	public static function provider()
	{
		return array(
			array("0", 0),
			array("", 0),
			array(false, 0),
			array(null, 0),
			array(null, false),
			array("", false)
		);
	}

	/**
	* @dataProvider provider
	*/
	public function test_com_provider($valor, $esperado)
	{
		$this->assertEquals($esperado, $valor);
	}
}

function sou_o_arquivo_executado()
{
	$included_files = get_included_files();
	$boot = realpath($included_files[0]);
	return realpath(__FILE__) === $boot;
}

if (sou_o_arquivo_executado())
	SemConexaoTest::main();

?>